﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SettingModule.Views.ELMListConfigView
{
    public partial class ELMListConfigView : UserControl,IELMListConfigView
    {
        public ELMListConfigView()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(ELMListConfigView_Loaded);
        }

        void ELMListConfigView_Loaded(object sender, RoutedEventArgs e)
        {
            model.InitialData();
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            model.ShowNewDetail();
        }

        private void View_Click(object sender, RoutedEventArgs e)
        {
            model.ShowDetail(ELMApplication.Common.Const.PrivegeTypes.Edit);
        }

        #region IELMListConfigView Members
        IELMListConfigPresentationModel model;
        public void SetModel(IELMListConfigPresentationModel model)
        {
            this.DataContext = this.model = model;
        }

        #endregion
    }
}
